
Ext.override(Ext.form.NumberField, {
	setValue : function(v){
		v = Ext.isNumber(v) ? v : parseFloat(String(v).replace(this.decimalSeparator, "."));
        v = isNaN(v) ? '' : String(v).replace(".", this.decimalSeparator);
        if(!Ext.isEmpty(v)) {
        	if(this.decimalPrecision > 0) {
        		var length = this.decimalPrecision;
	        	if(v.indexOf(".") != -1) {
	        		var pos = v.length - (v.indexOf(".")+1);
	        		length = length - pos;
				} else {
					v = v + ".";
				}
				if(length > 0) {
		        	for(var i=0;i<length;i++) {
		        		v = v + "0";
		        	}
				}
        	}
        }
        return Ext.form.NumberField.superclass.setValue.call(this, v);
    }
});

